package com.rzjm.exercise.common.validator.validator;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

import com.rzjm.exercise.common.validator.ValidatorUtils;
import com.rzjm.exercise.common.validator.annotation.IdCard;

public class IdCardValidator implements ConstraintValidator<IdCard, String>{

	@Override
	public boolean isValid(String value, ConstraintValidatorContext context) {
		return ValidatorUtils.isIdCard(value);
	}
}
